package com.example.httpmessageconvert.httpmessageconvert.controller;

import com.example.httpmessageconvert.httpmessageconvert.model.ExamApp;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;


/**
 * @author 奶茶
 * Created by on 2018/1/2.
 */
@RestController
public class HttpMessageConvertController {

    @RequestMapping(value = "/testController",method = RequestMethod.POST)
    public @ResponseBody
    ExamApp testController(String name, @RequestBody String map, HttpServletRequest request) throws JsonProcessingException {
        System.out.println(name);
        ExamApp examApp = new ExamApp();
        examApp.setAppName("测试考点");
        return examApp;
    }
}
